import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': resolve(__dirname, './src')
    }
  },
  server: {
    host: '0.0.0.0',
    port: 3000,
    // 是否开启 https
    https: false,
    proxy: {
      //这里是通过请求/api 来转发到 http://127.0.0.1:88/
      '/api/': 'http://127.0.0.1:8081/'
    }
  }
})
